import axios from 'axios';

// 搜索帖子
// 用法：searchPosts({ keyword, offset, limit })
export async function searchPosts(params: { keyword: string; offset?: number; limit?: number }) {
  return axios.get<Array<{
    id: number;
    authorId: number;
    title: string;
    content: string;
    status: number;
    commentCount: number;
    likeCount: number;
    createTime: string;
    updateTime: string;
  }>>('/posts/search', { params });
}

// 你可以根据需要扩展用户、资源等搜索接口
